Many imaging and scanning applications acquire images in an automated fashion. The acquired images should be properly focused to facilitate meaningful analysis and interpretation. To acquire a properly focused image, a focal distance, for example a focal height or focal length, should be correctly determined before acquiring the image. This can be done, for example, by acquiring several images at a given location using different focal distances, and then choosing the best focused image. Acquiring multiple images can be time consuming especially in applications where a large number of images must be captured within a short time span.
An imaged object or plane can have local variations that require different focal distances for different locations on the object or plane to achieve an acceptably focused image. For example, the surface of a glass microscope slide or a biological specimen deposited thereon may not be perfectly planar and simply determining a focal plane to represent the focal distances at different locations on the entire slide does not account for such local variations. In such cases, to acquire sharp and clearly focused images, the focal distance may need to be determined for each of a plurality of locations on the slide. Fine tuning the focal distance at each location, for example by doing a full focus search, is time consuming and may not be feasible in many applications.